<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" 
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="/resources/templates/template.xhtml">
        <ui:define name="content">
            <p:layout style="min-height: 100%; max-height: 100%;padding-right: 10px;padding-left: 10px">
                <p:layoutUnit position="center" >
                    <br/>
                    <br/>
                    <br/>
                    <div align="center" > 
                        <h:form>                                                          
                            <p:panel header="#{bundle.Register}"  style="min-width: 40%;max-width: 40%">                          
                                <!--                                <h:panelGrid columns="2">
                                                                    <h:outputLabel value="#{bundle.CreateUtilisateurLabel_nom}" for="nom" />
                                                                    <p:inputText id="nom" value="#{utilisateurController.selected.nom}" title="#{bundle.CreateUtilisateurTitle_nom}" required="true" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_nom}"/>
                                                                    <h:outputLabel value="#{bundle.CreateUtilisateurLabel_prenom}" for="prenom" />
                                                                    <p:inputText id="prenom" value="#{utilisateurController.selected.prenom}" title="#{bundle.CreateUtilisateurTitle_prenom}" required="true" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_prenom}"/>
                                                                    <h:outputLabel value="#{bundle.CreateUtilisateurLabel_login}" for="login" />
                                                                    <p:inputText id="login" value="#{utilisateurController.selected.login}" title="#{bundle.CreateUtilisateurTitle_login}" required="true" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_login}"/>
                                                                    <h:outputLabel value="#{bundle.CreateUtilisateurLabel_password}" for="password1" />
                                                                    <p:password id="password1" value="#{utilisateurController.selected.password}" match="password2"  title="#{bundle.CreateUtilisateurTitle_password}" required="true" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_password}" />
                                                                    <h:outputLabel value="#{bundle.CreateUtilisateurLabel_retypePassword}" for="password2" />
                                                                    <p:password id="password2" value="#{utilisateurController.selected.password}" title="#{bundle.CreateUtilisateurLabel_retypePassword}" required="true" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_password}" />
                                                                </h:panelGrid>-->
                                <p:wizard widgetVar="wiz"  
                                          flowListener="#{registerController.onFlowProcess}">  
                                    <p:tab id="personal" title="Utilisateur">  
                                        <p:panel header="Details Utilisateur">  
                                            <p:messages showDetail="true" autoUpdate="true" showSummary="false"/>
                                            <h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">  
                                                <h:outputText value="#{bundle.CreateUtilisateurTitle_prenom} *" />  
                                                <p:inputText required="true" label="#{bundle.CreateUtilisateurTitle_prenom}"  
                                                             value="#{registerController.user.prenom}" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_prenom}"/>
                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_nom} *" />  
                                                <p:inputText required="true" label="#{bundle.CreateUtilisateurLabel_nom}"  
                                                             value="#{registerController.user.nom}" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_nom}" />                                                    
                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_adresseinsc} *" />  
                                                <p:inputText required="true" label="#{bundle.CreateUtilisateurLabel_adresseinsc}"  
                                                             value="#{registerController.user.adresseinsc}" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_adresse}" />                                                    

                                            </h:panelGrid>  
                                        </p:panel>  
                                    </p:tab>  
                                    <p:tab id="login" title="Login et Password">  
                                        <p:panel header="Login et Password">  
                                            <p:messages showDetail="true" autoUpdate="true" showSummary="false" />
                                            <h:panelGrid columns="2" columnClasses="label, value" id="ll">  
                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_login} *" />  
                                                <p:inputText value="#{registerController.user.login}" required="true" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_login}"/>  

                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_password} *" />  
                                                <p:password value="#{registerController.user.password}" id="pass1" match="pass2" feedback="true" required="true" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_password}" label="Password 1"/>  

                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_retypePassword} *" />  
                                                <p:password value="#{registerController.user.password}" id="pass2" feedback="true" required="true" requiredMessage="#{bundle.CreateUtilisateurRequiredMessage_password}" label="Password 2"/>   
                                            </h:panelGrid>  
                                        </p:panel>  

                                    </p:tab>  
                                    <p:tab id="confirm" title="Confirmation">
                                        <p:panel header="Confirmation">			
                                            <p:panelGrid id="confirmation" columns="2">                                        
                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_nom}" />
                                                <h:outputText value="#{registerController.user.nom}"/>

                                                <h:outputText value="#{bundle.CreateUtilisateurTitle_prenom}" />
                                                <h:outputText value="#{registerController.user.prenom}"/>  

                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_login}"/>
                                                <h:outputText value="#{registerController.user.login}"/>

                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_password}"/>
                                                <h:outputText value="#{registerController.user.password}"/>
                                                <h:outputText value="#{bundle.CreateUtilisateurLabel_adresseinsc}"/>
                                                <h:outputText value="#{registerController.user.adresseinsc}"/>
                                            </p:panelGrid>
                                            <p:commandButton value="#{bundle.Register}" actionListener="#{registerController.Register}" update="growl" process="@parent"/>
                                            <p:button outcome="/user/public.xhtml" value="CommerceOne" />
                                        </p:panel>
                                    </p:tab>
                                </p:wizard>
                            </p:panel>
                            <p:growl id="growl" sticky="true" showDetail="false" />  
                        </h:form>
                    </div>
                </p:layoutUnit>
            </p:layout>
        </ui:define>        
    </ui:composition>
</html>